import Vue from 'vue'
import VueRouter from 'vue-router'
// 路由
import Login from "@/components/Login/Login";
import Home from "@/components/Home/Home";
 import Page from "@/components/Page/Page";
 import Paperwork from "@/components/Paperwork/Paperwork";
 import Info from "@/components/Info/Info";
 import User from "@/components/User/User";
import Set from "@/components/Set/Set";



Vue.use(VueRouter)


const router = new VueRouter({
  routes:[
      // 重定向
    {path:'/',redirect: '/login'},
      // 路由规则
    {path:'/login',component:Login},
    {path:'/home',component:Home,
    children:[
      {path:'',component:Page},
      {path:'page',component:Page},
      {path:'paperwork',component:Paperwork},
      {path:'info',component:Info},
      {path:'user',component:User}
    ]},
    {path:'/set',component:Set}

  ]
})

export default router
